4 import java.awt.event.ActionEvent;
5 import java.awt.event.ActionListener;
7 import javax.swing.GroupLayout;
8 import javax.swing.GroupLayout.Alignment;
9 import javax.swing.JButton;
10 import javax.swing.JFrame;
11 import javax.swing.JPanel;
12 import javax.swing.border.EmptyBorder;
16 public class OffersRelatedOwnerGUI extends JFrame {
21 private static final long serialVersionUID = 1L;
22 private JPanel contentPane;
27 public OffersRelatedOwnerGUI(Owner o) {
28 this.getContentPane().setLayout(null);
30 setBounds(100, 100, 450, 562);
31 contentPane = new JPanel();
32 contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
33 setContentPane(contentPane);
35 JButton btnCreateOffers = new JButton("Create Offers");
36 btnCreateOffers.addActionListener(new ActionListener() {
37 public void actionPerformed(ActionEvent arg0) {
38 Frame a = new AddOffersGUI(owner.getRuralHouses());
43 JButton btnModifyOffers = new JButton("Modify Offers");
44 btnModifyOffers.addActionListener(new ActionListener() {
45 public void actionPerformed(ActionEvent e) {
47 Frame a = new ModifyOfferGUI(owner);
53 JButton btnDeleteOffers = new JButton("Delete Offers");
54 btnDeleteOffers.addActionListener(new ActionListener() {
55 public void actionPerformed(ActionEvent e) {
56 Frame a = new DeleteOfferGUI(owner);
60 GroupLayout gl_contentPane = new GroupLayout(contentPane);
61 gl_contentPane.setHorizontalGroup(
62 gl_contentPane.createParallelGroup(Alignment.LEADING)
63 .addGroup(gl_contentPane.createSequentialGroup()
65 .addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)
66 .addComponent(btnDeleteOffers, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 1125, Short.MAX_VALUE)
67 .addComponent(btnModifyOffers, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 1125, Short.MAX_VALUE)
68 .addComponent(btnCreateOffers, GroupLayout.DEFAULT_SIZE, 1125, Short.MAX_VALUE))
71 gl_contentPane.setVerticalGroup(
72 gl_contentPane.createParallelGroup(Alignment.LEADING)
73 .addGroup(gl_contentPane.createSequentialGroup()
75 .addComponent(btnCreateOffers, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE)
77 .addComponent(btnModifyOffers, GroupLayout.PREFERRED_SIZE, 57, GroupLayout.PREFERRED_SIZE)
79 .addComponent(btnDeleteOffers, GroupLayout.PREFERRED_SIZE, 54, GroupLayout.PREFERRED_SIZE)
80 .addContainerGap(394, Short.MAX_VALUE))
82 contentPane.setLayout(gl_contentPane);